home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 July / EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso / softwareupdate / newiconsv3 / install / update_newicons < prev    next >
Text File  |  1996-07-14  |  17KB  |  593 lines

  1. ; NewIcons 3.0 Updater Script
  2. ; $Ver: 39.1 (14-Jul-96)
  3. ; Written by Phil Vedovatti
  4. ; Brought to you by the NewIcons Team
  5.  
  6. (set @default-dest "SYS:C")
  7.  
  8. (set cpu (database "cpu"))
  9. (set cpu020 (and (<> cpu "68000") (<> cpu "68010")))
  10. (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  11.  
  12. (set #bad-kick
  13.    (cat "\n\nSorry! You must have Workbench 2.0 or"
  14.         "higher to to use this package."))
  15.  
  16. (set #hello-message
  17.    (cat "\n\nThank you for updating NewIcons, the revolutionary"
  18.         "\nGraphical User Interface system for the Amiga."
  19.         "\nPlease read the documentation to get the most out"
  20.         "\nof this package.  Nothing will be deleted from your"
  21.         "\nsystem with this installation program.  Your old WB"
  22.         "\nicons will still be there, even though it won't look"
  23.         "\nlike it on your screen.  If you don't understand any"
  24.         "\npart of the installation, click on the \"Help\" gadget"
  25.         "\nfound throughout the installation for more information."
  26.         "\n\nCLICK TO PROCEED"))
  27.  
  28. (set #install-which
  29.    (cat "\nWhich part(s) of the NewIcons System would"
  30.         "\nyou like to update onto your hard drive?\n"))
  31.  
  32. (set #install-library
  33.    (cat "\n\nInstalling NewIcon.library to LIBS:."))
  34.  
  35. (set #install-library-help
  36.    (cat "\n\nThis library is required to use NewIcons."))
  37.  
  38. (set #install-newicons
  39.    (cat "\n\nCopying the NewIcons executable file"
  40.         "\n and support files to C:"))
  41.  
  42. (set #install-newicons-help
  43.    (cat "\n\nThis section installs NewIcons, InjectBrush"
  44.         "\nand PatchOpenWB to your C: directory."))
  45.  
  46. (set #tools-dest
  47.    (cat "\nWhich drawer would you like the NewIcon"
  48.         "\nmanipulation utilities to be installed?"
  49.         "\nA drawer will NOT be created."))
  50.  
  51. (set #install-prefs
  52.    (cat "\nInstalling NewIconsPrefs to your"
  53.         "\nSys:prefs directory."))
  54.  
  55. (set #install-prefs-help
  56.    (cat "\nUse this program to configure NewIcons!"))
  57.  
  58. (set #run-prefs
  59.    (cat "\nStarting NewIconsPrefs so you can configure"
  60.         "\nNewicons right away. The effect will not be"
  61.         "\nevident until you reboot."
  62.         "\nBe sure to save your changes."))
  63.  
  64. (set #startup-change
  65.    (cat "\nNewIcons V3.0 requires a change in"
  66.         "\nyour user startup to launch it.  Shall I add"
  67.         "\n\n'Run <NIL: >NIL: c:NewIcons'"
  68.         "\n\nto your S:user-startup file?"
  69.         "\n\n(You may need to remove the old line manually"
  70.         "\nif you didn't originally install NewIcons"
  71.         "\nusing the Installer utility.)"))
  72.  
  73. (set #install-deficons
  74.    (cat "\n\nInstalling the DefIcons daemon to your"
  75.         "\nC: directory, and copying default icons"
  76.         "\nto your Envarc:sys directory."))
  77.  
  78. (set #install-deficons-help
  79.    (cat "\nThis sections installs the Deficons program"
  80.         "\nand copies the required def_icons to your"
  81.         "\nENVARC: directory."))
  82.  
  83. (set #move-olddefs-dir
  84.    (cat "The installer will move your old default"
  85.         "\nicons to another location for safe keeping."
  86.         "\nWhere would you like me to create a directory"
  87.         "\nto put them in?"))
  88.  
  89. (set #move-olddefs-help
  90.    (cat "\nThis section copies your old default icons to"
  91.         "\na safe place instead of overwriting them."
  92.         "\nShould you wish to deinstall Deficons, you"
  93.         "\nWill have them available to restore."))
  94.  
  95. (set #move-olddefs
  96.    (cat "Moving your old default icons to \n"
  97.         destdir))
  98.  
  99. (set #install-envarc
  100.    (cat "\nCopying the default icons and brainfile"
  101.         "\nto ENVARC: so DefIcons can use them.\n"))
  102.  
  103. (set #install-envarc-help
  104.    (cat "\n\nThis section install the icons that DefIcons"
  105.         "\nwill use to display icon images for files that"
  106.         "\ndon't have icons already attached to them."))
  107.  
  108. (set #startup-deficons
  109.    (cat "\n\nAdding a line to your S:user-Startup file"
  110.         "\nto launch DefIcons whenever the system"
  111.         "\nis booted up."))
  112.  
  113. (set #powb-message
  114.    (cat "\n\nIf you have installed NewIcons, you must "
  115.            "add a line to your S:Startup-Sequence:\n\n"
  116.            "C:PatchOpenWB\n"
  117.            "\nto fix a bug in the 3.x operating system!"
  118.            "\n\n Make sure to place the line after Setpatch"
  119.            "\nand before IPrefs."))
  120.  
  121. (set #docs-dest
  122.    (cat "Where would you like the NewIcons Documentation"
  123.         "\nGuide to be installed?"))
  124.  
  125.  
  126. (set #exit-message
  127.    (cat "Please reboot your system to fully activate\n"
  128.         "the new NewIcons System."
  129.         "\n\n\nWe hope you enjoy this package!"))
  130.  
  131.  
  132. ; ClassAct installation procedure V 1.5 (12.5.96) by Osma Ahvenlampi
  133.  
  134. ; percentage of the size of included ClassAct classes versus the whole
  135. ; distribution (ie. total "complete" percentage after ClassAct is installed)
  136.  
  137. (set classact-complete 70)
  138.  
  139. ; ClassAct installer scripts
  140. (set #classdest-prompt "Please select the directory where you want the ClassAct classes installed.\n(See help for details)")
  141. (set #classdest-help (cat "ClassAct is a GUI toolkit consisting of shared BOOPSI classes.\n\nSome programs require some or all of the ClassAct classes installed on your system. "
  142.     (if v39 (cat "OS 3.0 has a standard directory for BOOPSI classes, the SYS:Classes directory. It is recommended that you install ClassAct there.")
  143.             (cat "OS 2.0 does not have a standard place for disk resident BOOPSI classes. On OS 3.0 these classes are stored in the SYS:Classes directory. It is recommended that you create this directory and install ClassAct there.\nThis directory must be added in the LIBS: assign. This can be done by placing the command\nAssign >NIL: LIBS: SYS:Classes ADD\nto User-Startup. This installer will do this for you.")
  144.         )
  145.     )
  146. )
  147. (set #classes-020 "Do you want to use the OS 3.0, 020 optimised version of ClassAct?")
  148. (set #help-020 "Some ClassAct libraries have versions optimised for use on 020 or better equipped OS 3.0 or later machines. If your Amiga is such equipped, you should install these. The 68000/2.0 versions will also work, but are slightly slower.")
  149. (set #noclasses-message "The directory you selected for your ClassAct classes is not a part of the LIBS: assign.\n\nIt is necessary to add this assign so that the classes will be found properly.")
  150. (set #creating-dir "Creating directory ")
  151. (set #usbackup-prompt "User-Startup will now be backed up.")
  152. (set #usbackup-help "This installer will next make a modification in User-Startup. Before doing this the old User-Startup will be backed up to S:User-Startup.old")
  153. (set #adding-1 "Adding ")
  154. (set #adding-2 " to LIBS: assign\n")
  155. (set #adding-help "This is necessary so that the custom classes can be found.")
  156. (set #junod-button "It seems you have a late Commodore 'V42' button.gadget installed on your system.\n\nClassAct's button.gadget is far more capable than this gadget, and we recommend that you replace it. The ClassAct button.gadget is backwards compatible to the Commodore gadget. Do you wish to back up the Commodore gadget and replace it with the ClassAct version?")
  157. (set #junod-backed "The Commodore 'V42' button.gadget has been backed up with the name button.gadget.v42.\n\nThe ClassAct button.gadget will be installed in its place.")
  158. (set #junod-kept "The Commodore 'V42' button.gadget was not replaced with the more capable ClassAct version.\n\nPrograms depending on the availability of ClassAct-only features will be likely to work wrong.")
  159. (set #caprefs-message "CAPrefs is a small utility that sets some user preferences for ClassAct applications. These include the bevel style (Thin/Gadtools/Xen), window backfills, and group label details.\n\nPlease use the ClassAct GUI prefs editor to alter the default settings provided. ClassAct prefs will be installed in your system Prefs drawer.\n\n")
  160. (set #caprefs-startup-1 "Adding the command\n\n")
  161. (set #caprefs-startup-2 "\n\nTo your s:User-Startup.")
  162.  
  163. (procedure install-classact
  164. (debug "classact")
  165. ; call this procedure to copy the classes included in the Classes directory
  166. ; in your distribution dir.
  167.     (if (exists "Classes") ; The archive contains a ClassAct library update.
  168.     (
  169.         (set comp-dest  (/ (* classact-complete 5) 10))
  170.         (set comp-libs  (/ (* classact-complete 5) 10))
  171.         (set comp-dirs  (/ (* classact-complete 6) 10))
  172.         (set comp-junod (/ (* classact-complete 6) 10))
  173.         (set comp-020   (/ (* classact-complete 7) 10))
  174.         (set comp-gad   (/ (* classact-complete 7) 10))
  175.         (set comp-im    (/ (* classact-complete 8) 10))
  176.         (set comp-prefs (/ (* classact-complete 9) 10))
  177.  
  178.         ; has the user installed ClassAct in CLASSACT: ?
  179.         (set @classact-dest (getassign "CLASSACT" "A"))
  180.         (if (= @classact-dest "") (set @classact-dest "SYS:Classes"))
  181.  
  182.         ; is ClassAct already in SYS:Classes ?
  183.         (if (or (not (exists (tackon @classact-dest "Gadgets/layout.gadget") (noreq)))
  184.                 (= @user-level 2))
  185.             ; no, ask where it should be placed
  186.             (set @classact-dest
  187.                 (askdir
  188.                     (prompt #classdest-prompt)
  189.                     (help #classdest-help)
  190.                     (default @classact-dest)
  191.                     (newpath)
  192.                 )
  193.             )
  194.         )
  195.  
  196.         (complete comp-dest)
  197.  
  198.         (if (<> (run (cat "C/CheckAssign LIBS: " @classact-dest)) 0)
  199.             (
  200.                 (message #noclasses-message)
  201.                 (if (not (exists @classact-dest))
  202.                     (makedir @classact-dest (prompt (cat #creating-dir @classact-dest)))
  203.                 )
  204.                 (set @addassign (cat "Assign >NIL: LIBS: " @classact-dest " ADD\n"))
  205.                 (startup "CLASSACT"
  206.                     (command @addassign)
  207.                     (prompt (cat #adding-1 @classact-dest #adding-2))
  208.                     (help #adding-help)
  209.                 )
  210.                 (run (@addassign))
  211.             )
  212.         )
  213.  
  214.         (complete comp-libs)
  215.  
  216.         (set @classact-gadgets (tackon @classact-dest "Gadgets"))
  217.         (set @classact-images (tackon @classact-dest "Images"))
  218.  
  219.         (if (not (exists @classact-gadgets (noreq)))
  220.             (makedir @classact-images
  221.                 (prompt (cat #creating-dir @classact-gadgets))
  222.             )
  223.         )
  224.  
  225.         (if (not (exists @classact-images (noreq)))
  226.             (makedir @classact-images
  227.                 (prompt (cat #creating-dir @classact-images))
  228.             )
  229.         )
  230.  
  231.         (complete comp-dirs)
  232.  
  233.         (if (exists "SYS:Classes/Gadgets/button.gadget")
  234.             (if (< 40 (/ (getversion "SYS:Classes/Gadgets/button.gadget") 65536))
  235.                 (if (askbool (prompt #junod-button) (help @askbool-help) (default 1))
  236.                     (
  237.                         (rename "SYS:Classes/Gadgets/button.gadget" "SYS:Classes/Gadgets/button.gadget.v42")
  238.                         (message #junod-backed)
  239.                     )
  240.                     (message #junod-kept)
  241.                 )
  242.             )
  243.         )
  244.  
  245.         (complete comp-junod)
  246.  
  247.         (if (exists "Classes/Gadgets/layout.gadget.020")
  248.             (set classes-020 (askbool (prompt #classes-020) (help #help-020) (default (and cpu020 v39))))
  249.             (set classes-020 0)
  250.         )
  251.  
  252.         (complete comp-020)
  253.  
  254.         (foreach "Classes/Gadgets" "#?.gadget"
  255.             (
  256.                 (set thislib (tackon "Classes/Gadgets" @each-name))
  257.                 (if (and classes-020 (exists (cat thislib ".020")))
  258.                     (set thislib (cat thislib ".020"))
  259.                 )
  260.                 (copylib (source thislib)
  261.                     (dest @classact-gadgets)
  262.                     (newname @each-name)
  263.                     (prompt (cat #installing @each-name))
  264.                     (help #classdest-help)
  265.                     (optional "force" "askuser")
  266.                 )
  267.             )
  268.         )
  269.  
  270.         (complete comp-gad)
  271.  
  272.         (foreach "Classes/Images" "#?.image"
  273.             (
  274.                 (set thislib (tackon "Classes/Images" @each-name))
  275.                 (if (and classes-020 (exists (cat thislib ".020")))
  276.                     (set thislib (cat thislib ".020"))
  277.                 )
  278.                 (copylib (source thislib)
  279.                     (dest @classact-images)
  280.                     (newname @each-name)
  281.                     (prompt (cat #installing @each-name))
  282.                     (help #classdest-help)
  283.                     (optional "force" "askuser")
  284.                 )
  285.             )
  286.         )
  287.  
  288.         (complete comp-im)
  289.  
  290.         (foreach "Classes" "#?.class"
  291.             (
  292.                 (set thislib (tackon "Classes" @each-name))
  293.                 (if (and classes-020 (exists (cat thislib ".020")))
  294.                     (set thislib (cat thislib ".020"))
  295.                 )
  296.                 (copylib (source thislib)
  297.                     (dest @classact-dest)
  298.                     (newname @each-name)
  299.                     (prompt (cat #installing @each-name))
  300.                     (help #classdest-help)
  301.                     (optional "force" "askuser")
  302.                 )
  303.             )
  304.         )
  305.     )
  306.     )
  307.     (if (exists "Prefs/ClassAct") ; The archive contains ClassAct prefs tools
  308.     (
  309.         (message #caprefs-message)
  310.  
  311.         (copylib (source "Prefs/CAPrefs")
  312.             (dest "C:")
  313.             (prompt (cat #installing "CAPrefs"))
  314.         )
  315.         (copylib (source "Prefs/ClassAct")
  316.             (dest "SYS:Prefs")
  317.             (prompt (cat #installing "ClassAct Prefs"))
  318.             (infos)
  319.         )
  320.  
  321.         (complete comp-prefs)
  322.  
  323.         (if (not (exists "ENVARC:ClassAct" (noreq)))
  324.             (
  325.                 (makedir "ENVARC:ClassAct"
  326.                     (prompt (cat #creating-dir "ENVARC:ClassAct"))
  327.                 )
  328.                 (textfile (dest "ENVARC:ClassAct/ClassAct")
  329.                     (append "")
  330.                 )
  331.             )
  332.         )
  333.  
  334.         (set caprefs-cmd "C:CAPrefs >NIL:\n")
  335.  
  336.         (startup "CAPREFS"
  337.             (prompt (cat #caprefs-startup-1 caprefs-cmd #caprefs-startup-2))
  338.             (help #caprefs-message)
  339.             (command caprefs-cmd)
  340.         )
  341.     )
  342.     )
  343.  
  344.     (complete classact-complete)
  345. )
  346.  
  347.  
  348.  
  349.  
  350. ; ------------------------------
  351. ; Check Kickstart Version
  352. ; ------------------------------
  353.  
  354.  
  355.  (if (< (getversion "LIBS:version.library") (* 37 65536))
  356.         (abort #bad-kick)
  357.  )
  358.  
  359. (message #hello-message)
  360.  
  361.  
  362. ; ------------------------------
  363. ; What should I install?
  364. ; ------------------------------
  365. (complete 0)
  366. (set InstallOpt
  367.       (askoptions (prompt #install-which)
  368.                   (help @askoptions-help)
  369.                   (choices "NewIcons" "DefIcons" "Documentation")
  370.       )
  371. )
  372.  
  373.  
  374. ; ------------------------------
  375. ; Install NewIcon.library
  376. ; ------------------------------
  377.  
  378. (complete 10)
  379. (if ((patmatch (database "cpu") ("68000|68010")
  380.      )
  381.     )
  382.       (copylib
  383.            (source "/libs/000/newicon.library")
  384.            (dest "libs:")
  385.            (prompt #install-library)
  386.            (help #install-library-help)
  387.            (confirm)
  388.       )
  389.  
  390.       (if (>= (getversion "LIBS:version.library") (* 39 65536)
  391.           )
  392.  
  393.            (copylib
  394.                 (source "/libs/020-V39/newicon.library")
  395.                 (dest "libs:")
  396.                 (prompt #install-library)
  397.                 (help #install-library-help)
  398.                 (confirm)
  399.            )
  400.            (copylib
  401.                 (source "/libs/000/newicon.library")
  402.                 (dest "libs:")
  403.                 (prompt #install-library)
  404.                 (help #install-library-help)
  405.                 (confirm)
  406.            )
  407.       )
  408. )
  409.  
  410. ;--------------------------------------------------------
  411. ; Install NewIcons, icon images, and icon support files
  412. ;--------------------------------------------------------
  413.  
  414. (complete 20)
  415. (if (BITAND InstallOpt 1)
  416.  
  417.    ((complete 25)
  418.  
  419.    (copylib
  420.       (prompt #install-newicons)
  421.       (source "/C/NewIcons")
  422.       (dest "c:")
  423.       (help #install-newicons-help)
  424.    )
  425.  
  426.    (copylib
  427.       (source "/C/InjectBrush")
  428.       (dest "c:")
  429.    )
  430.  
  431.    (copylib
  432.       (source "/C/PatchOpenWB")
  433.       (dest "c:")
  434.    )
  435.  
  436.    (complete 30)
  437.  
  438.    (set destdir
  439.       (askdir
  440.             (prompt #tools-dest)
  441.             (help @askdir-help)
  442.             (default "Sys:Utilities")
  443.       )
  444.    )
  445.  
  446.    (copyfiles
  447.       (source "/Utilities/CopyNewIcon")
  448.       (dest destdir)
  449.       (infos)
  450.    )
  451.  
  452.    (copyfiles
  453.       (source "/Utilities/CreateDefaultIcon")
  454.       (dest destdir)
  455.       (infos)
  456.    )
  457.  
  458.    (copyfiles
  459.       (source "/Utilities/KillNewIcon")
  460.       (dest destdir)
  461.       (infos)
  462.    )
  463.  
  464.    (complete 35)
  465.  
  466.    (startup "NewIcons"
  467.       (prompt #startup-change)
  468.       (command "Run <NIL: >NIL: c:NewIcons")
  469.       (help @startup-help)
  470.    )
  471.  
  472.  
  473.    (copylib
  474.       (prompt #install-prefs)
  475.       (source "/prefs/NewIconsPrefs")
  476.       (dest "Sys:prefs")
  477.       (help #install-prefs-help)
  478.       (confirm)
  479.       (infos)
  480.    )
  481.  
  482.  
  483.  
  484.  
  485. ;------------------------------
  486. ;Install ClassAct classes
  487. ;------------------------------
  488.  
  489. ;   (message #install-classes
  490. ;      (help #install-classes-help)
  491. ;   )
  492.    (install-classact)
  493.   )
  494. )
  495. ;------------------------------
  496. ;Install Deficons
  497. ;------------------------------
  498. (complete 75)
  499. (if (BITAND InstallOpt 2)
  500.  
  501.  
  502.   ((set destdir
  503.       (askdir
  504.            (prompt #move-olddefs-dir)
  505.            (help #move-olddefs-help)
  506.            (default "Sys:Storage")
  507.       )
  508.    )
  509.  
  510.    (set destdir
  511.       (tackon destdir "Old_Def_icons")
  512.    )
  513.  
  514.    (makedir destdir
  515.    )
  516.  
  517.    (complete 80)
  518.  
  519.    (copyfiles
  520.       (prompt #move-olddefs)
  521.       (source "Envarc:sys")
  522.       (dest destdir)
  523.       (pattern "def#?")
  524.       (help #move-olddefs-help)
  525.    )
  526.  
  527.    (copylib
  528.       (prompt #install-deficons)
  529.       (source "/C/DefIcons")
  530.       (dest "C:")
  531.       (help #install-deficons-help)
  532.       (confirm)
  533.    )
  534.  
  535.    (copyfiles
  536.       (prompt #install-envarc)
  537.       (source "/envarc")
  538.       (dest "ENVARC:")
  539.       (all)
  540.       (infos)
  541.       (help #install-envarc-help)
  542.    )
  543.  
  544.    (startup "DefIcons"
  545.       (prompt #startup-deficons)
  546.       (command "DefIcons")
  547.       (help @startup-help)
  548.    )
  549.   )
  550. )
  551.  
  552.  
  553. ;------------------------------
  554. ;Install Documentation
  555. ;------------------------------
  556. (complete 90)
  557. (if (BITAND InstallOpt 4)
  558.  
  559.    ((set destdir
  560.       (askdir
  561.             (prompt #docs-dest)
  562.             (help @askdir-help)
  563.             (default "Help:")
  564.       )
  565.     )
  566.     (copyfiles
  567.       (source "/NewIcons.guide")
  568.       (dest destdir)
  569.       (infos)
  570.     )
  571.    )
  572. )
  573.  
  574.  
  575. ;------------------------------
  576. ;Run NIPrefs
  577. ;------------------------------
  578.  
  579. (complete 95)
  580. (run "/prefs/NewIconsPrefs"
  581.       (prompt #run-prefs)
  582.       (help "This lets you configure NewIcons.")
  583.       (confirm)
  584.       (safe)
  585. )
  586.  
  587. (run "Sys:Utilities/Multiview /NewIcons.guide"
  588.       (safe)
  589. )
  590. (complete 99)
  591. (message #powb-message)
  592. (complete 100)
  593. (exit #exit-message)